package hk.com.fgoproduction.getdroplets.Lib.Common.ToolInstance

import android.content.Context
import android.net.ConnectivityManager

object CheckConnection {
    fun isOnline(context: Context): Boolean {
        val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
        val info = cm.activeNetworkInfo

        return info !== null && info.isConnectedOrConnecting
    }
}